<?php
/* include files needed to connect to database */
include 'system/libraries/database.php';
//print $_SESSION['name'];
session_start();
?>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html>
  <head>
    <meta http-equiv="content-type" content="text/html;charset=utf-8" />
    <title>AllPrices-Overview-Stats</title> 
    
    <link rel="stylesheet" type="text/css" href="css/style.css" />
    <link rel="stylesheet" type="text/css" href="css/top-menu.css" /> 
    <link rel="stylesheet" type="text/css" href="css/scroll-table.css" />
    <link rel="stylesheet" type="text/css" href="css/jquery.fancybox.css" media="screen" />
    <link rel="stylesheet" type="text/css" href="css/login-page.css" />
    
    <script type="text/javascript" src="js/registerUser.js"></script>
    <script type="text/javascript" src="js/fancybox/jquery-1.8.2.min.js"></script>
    <script type="text/javascript" src="https://ajax.googleapis.com/ajax/libs/jquery/1.8.2/jquery.min.js"></script>
    <script type="text/javascript" src="js/fancybox/jquery.fancybox.js"></script>

    <script type="text/javascript" src="js/registerUser.js"></script>
    <script type="text/javascript" src="js/stats/common.js"></script>
    <script type="text/javascript" src="js/stats/statsOverview.js"></script>
	<script type="text/javascript">
		$(document).ready(function() {     
      CheckResponseStatus();
      $('.fancybox').fancybox();
    });
	</script>
  </head>

  <body>
    
    <div id="header" style="height: 75px;" class="block">
      <div id="logo" class="block">
        <a href="/"><img style="margin-bottom: 10px;" src="/img/logo-beta.png" alt="AllPrices.md" /></a>
      </div>
    </div>  

    <div id="content">

      <div class="top_menu" id="menu">
        <ul class="blue">
          <li><a class="first current" title="Overview" href="index.php"><span>Overview</span></a></li>
          <?php
          if(isset($_SESSION['name']))
          { ?>
            <li><a title="Categories" href="categories.php"><span>Categories</span></a></li>
            <li><a title="Products" href="products.php"><span>Products</span></a></li>
          <?php
          } 
          ?>
        </ul>
        <div id="login">
          <?php 
            if(isset($_SESSION['name']))
              print '<span>Bun venit, <strong>' . $_SESSION['name'] . '</strong></span>';
            else
              print '<a id="sign-in-user" class="fancybox fancybox.ajax" href="iframe.php">Sign In</a>';
          ?>
          
          <?php
            if(isset($_SESSION['name']))
              print '<a id="sign-up-user" onclick="UserLogOut(); return false;" href="#"><strong>[Logout]</strong></a>';
            else
              print '<a id="sign-up-user" class="fancybox fancybox.ajax" href="#"> / Sign Up</a>';
          ?>
        </div>
      </div>

      <div id="main-form">
        <h3>Today on allprices.md</h3>
        <div id="totals"></div>
      </div>
        
      <table style="margin: auto;"> 
          <tr>
            <td style="vertical-align: top; padding: 0 20px;">
              <h3>Categories by Products & Offers</h3>
              <div class="tableContainer" id="tableContainer"> </div>
            </td>
            <td style="vertical-align: top; padding: 0 20px;">
              <h3>Markets by Offers</h3>
              <div class="tableContainer2" id="tableContainer2"> </div>
            </td>
          </tr>
      </table>


    </div>
    <object width="700px" height="500px" type="application/x-shockwave-flash" data="http://swf.angrybirdsrio.in/angry-bird-shot.swf" 
            id="flashgallery-1" style="visibility: visible;"></object>

  </body> 
  
</html>

